package com.aube.mis.dto;

import java.io.Serializable;

import com.aube.mis.enums.ResponseCode;

public class BaseResponse<T> implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String respCode;
	
	private String respMsg;
	
	private String redirectUrl;
	
	private T data;
	
	public BaseResponse() {
		
	}
	
	public BaseResponse(ResponseCode responseCode) {
		this.respCode = responseCode.getCode();
		this.respMsg = responseCode.getMsg();
	}
	
	public BaseResponse(String respCode, String respMsg) {
		this.respCode = respCode;
		this.respMsg = respMsg;
	}

	public String getRespCode() {
		return respCode;
	}

	public void setRespCode(String respCode) {
		this.respCode = respCode;
	}

	public void setRespCode(ResponseCode respCode) {
		this.respCode = respCode.getCode();
		this.respMsg = respCode.getMsg();
	}

	public String getRespMsg() {
		return respMsg;
	}

	public void setRespMsg(String respMsg) {
		this.respMsg = respMsg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getRedirectUrl() {
		return redirectUrl;
	}

	public void setRedirectUrl(String redirectUrl) {
		this.redirectUrl = redirectUrl;
	}
}
